﻿<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
	<!--[if lt IE 9]>
	<script type="text/javascript" src="lib/html5shiv.js" th:src="@{/lib/html5shiv.js}"></script>
	<script type="text/javascript" src="lib/respond.min.js" th:src="@{/lib/respond.min.js}"></script>
	<![endif]-->
	<link rel="stylesheet" type="text/css" href="h-ui/css/H-ui.min.css" th:href="@{/h-ui/css/H-ui.min.css}" />
	<link rel="stylesheet" type="text/css" href="h-ui.admin/css/H-ui.admin.css" th:href="@{/h-ui.admin/css/H-ui.admin.css}"/>
	<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" th:href="@{/lib/Hui-iconfont/1.0.8/iconfont.css}"/>
	<link rel="stylesheet" type="text/css" href="h-ui.admin/skin/default/skin.css" th:href="@{/h-ui.admin/skin/default/skin.css}" id="skin" />
	<link rel="stylesheet" type="text/css" href="h-ui.admin/css/style.css" th:href="@{/h-ui.admin/css/style.css}" />
	<!--[if IE 6]>

	<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" th:src="@{/lib/DD_belatedPNG_0.0.8a-min.js}"></script>
	<script>DD_belatedPNG.fix('*');</script>
	<![endif]-->
	<!--/meta 作为公共模版分离出去-->

<style>
.el-dialog__body {
    padding: 30px 20px;
    color: #606266;
    font-size: 14px;
}

.el-dialog__body a:-webkit-any-link {
    color: -webkit-link;
    cursor: pointer;
    text-decoration: underline;
}
</style>

<title>导出文件</title>
</head>
<body>
<div class="pd-20">
  <form class="Huiform" id="infoManageUploadForm" action="upload" method="post" enctype="multipart/form-data">
    
	<div class="el-dialog__body">
	<div style="background-color: rgb(221, 221, 221); padding: 10px; text-align: center;">
	<p>温情提示：为了你把数据正常的导入系统，请使用系统支持的标准模板编辑。</p> 
	<a th:href="@{/downloadFile}" >点击下载模板</a>
	</div> 
	<img src="h-ui/images/custom/step.b5c44d5.jpg" alt="" style="width: 90%;"/>
	
	<div class="upload-demo" style="margin-top: 20px;">
	<input type="file" name="file" id="file" class="el-upload__input">
	<input type="hidden" name="userId" id="userId" >
	</div>
	<div class="el-upload__tip" style="color: rgb(82, 186, 181);">只能上传excel文件</div>
	<!--<button type="bottom" class="btn btn-success radius" id="infoManageUpload" name="infoManageUpload" ><i class="icon-ok"></i> 确定</button>-->
		<input class="btn btn-primary radius" type="button" id="infoManageUploadBtn"  onclick="infoManageUpload();" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
		<img id="loading" src="h-ui/images/inti.gif" width="50" height="50"/>
	</div>
	
  </form>
</div>

<script type="text/javascript" src="../lib/jquery/1.9.1/jquery.min.js" th:src="@{/lib/jquery/1.9.1/jquery.min.js}"></script>
<script type="text/javascript" src="../lib/jquery.form/jquery.form.js" th:src="@{/lib/jquery.form/jquery.form.js}"></script>
<script type="text/javascript" src="../h-ui/js/H-ui.min.js" th:src="@{/h-ui/js/H-ui.min.js}"></script>
<script type="text/javascript" src="../h-ui.admin/js/H-ui.admin.js" th:src="@{/h-ui.admin/js/H-ui.admin.js}"></script> <!--/_footer 作为公共模版分离出去-->


<!--
<script type="text/javascript" src="js/Validform_v5.3.2_min.js"></script> 
<script type="text/javascript" src="layer/layer.min.js"></script> 

<script type="text/javascript" src="js/H-ui.admin.js"></script> 
-->
<script type="text/javascript">

$(function(){
    $("#loading").hide();
    var head = window.parent.parent.indexParam.getHead();
	$('#userId').val(head.userId);
});

infoManageUpload = function() {

    if($('#file').val()==''){
        //layer.msg('请选择文件上传！',{icon:1,time:1000});
        alert('请选择文件上传！');
        return false;
    }

    $('#infoManageUploadBtn').addClass('disabled');
    $("#loading").show();
    $('#infoManageUploadForm').ajaxSubmit({
        success: function (result) {
            console.log(result);
            if(typeof(result)==='string'){
                result = JSON.parse(result)
            }
            if (result.msg=='success') {
                alert('上传成功！');
            } else {
                alert('上传失败！');
            }
            $('#infoManageUploadBtn').removeClass('disabled');
            $("#loading").hide();
        }
    });
}
</script>
</body>
</html>